#
# MAINTAINER        99fu <958177388@qq.com>
# DOCKER-VERSION    1.6.2
#
# Dockerizing maven: Dockerfile for building maven images
#
FROM       99fu.cn:5000/fu/jdk:1.7
MAINTAINER 99fu <958177388@qq.com>

ENV MAVEN_VERSION 3.3.9
ENV MAVEN_HOME /opt/maven

# Install maven
#ADD http://mirror.cc.columbia.edu/pub/software/apache/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz /opt/

#COPY apache-maven-3.3.9 /opt/apache-maven-3.3.9
ADD apache-maven-3.3.9 /opt/apache-maven-3.3.9



#RUN  tar xzf /opt/apache-maven-3.3.9-bin.tar.gz -C /opt && \
RUN     mv /opt/apache-maven-${MAVEN_VERSION} /opt/maven  && \
    ln -s /opt/maven/bin/mvn /usr/bin/mvn
    
RUN chmod a+x /usr/bin/mvn

#单位网络打开
COPY settings.xml /opt/maven/conf/settings.xml

ADD hello /hello
RUN cd /hello && \
    mvn clean install -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
    
    
